package net.qiqbframework.serialization;


import javax.annotation.Nonnull;
import javax.annotation.Nullable;


public interface Serializer {


    <T> SerializedObject<T> serialize(@Nullable Object object, @Nonnull Class<T> expectedRepresentation);


    <T> boolean canSerializeTo(@Nonnull Class<T> expectedRepresentation);

    <S, T> T deserialize(@Nonnull SerializedObject<S> serializedObject);

    Class classForType(@Nonnull SerializedType type);


    SerializedType typeForClass(@Nullable Class type);

    Converter getConverter();
}
